<template>
<div class="header">
  <div
    class="iconfont header-back"
    @click="backClick"
  >&#xe624;</div>
  <span>{{title}}-去哪儿网</span>
  <router-link to="/" class="header-home">首页</router-link>
</div>
</template>

<script>
export default {
  props: {
    title: String
  },
  methods: {
    backClick () {
      history.back(-1)
    }
  }
}
</script>

<style lang="stylus" scoped>
@import '~_style/var.styl'
.iconfont
  font-size:.36rem
  font-weight: bold
.header
  width:100%
  height: 0.86rem
  line-height: 0.86rem
  background: $bgColor
  font-size:.32rem
  color: #fff
  text-align:center
  display:flex
  span
    flex:1
    ellipsis()
  .header-back
    width:.95rem
    float:left
  .header-home
    width:1.24rem
    float:right
    text-align: center
    color:#fff
</style>
